<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 智慧后勤综合管理系统</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #e0f7fa, #bbdefb, #90caf9);
            color: #333;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        header {
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            padding: 15px 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo i {
            font-size: 28px;
            color: #2563eb;
        }

        .logo h1 {
            font-size: 24px;
            color: #2563eb;
            font-weight: 700;
        }

        .nav-links {
            display: flex;
            gap: 25px;
        }

        .nav-links a {
            text-decoration: none;
            color: #333;
            font-weight: 500;
            padding: 8px 12px;
            border-radius: 6px;
            transition: all 0.3s ease;
        }

        .nav-links a:hover, .nav-links a.active {
            background: #2563eb;
            color: white;
        }

        .nav-links .active {
            background: #2563eb;
            color: white;
        }

        .user-actions {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .user-actions button {
            padding: 8px 16px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .login-btn {
            background: #2563eb;
            color: white;
        }

        .register-btn {
            background: #f0f7ff;
            color: #2563eb;
            border: 1px solid #2563eb !important;
        }

        .user-actions button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }

        /* 用户信息展示区域 */
        .user-info {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .user-info:hover {
            background: rgba(37, 99, 235, 0.1);
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: #eff6ff;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2563eb;
            font-size: 18px;
        }

        .user-name {
            font-weight: 500;
            color: #333;
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .page-title {
            color: #2563eb;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #eef6ff;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .page-title i {
            font-size: 28px;
        }

        /* 主页面样式 */
        .dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 25px;
            margin-top: 20px;
        }

        .card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            padding: 25px;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
            cursor: pointer;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
            border-color: #c7d2fe;
        }

        .card-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 15px;
        }

        .card-header i {
            font-size: 28px;
            width: 60px;
            height: 60px;
            background: #eff6ff;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            color: #2563eb;
        }

        .card-title {
            font-size: 20px;
            font-weight: 600;
            color: #1e293b;
        }

        .card-content {
            color: #64748b;
            line-height: 1.6;
        }

        footer {
            background: rgba(0, 0, 0, 0.7);
            color: white;
            text-align: center;
            padding: 20px;
            margin-top: auto;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .copyright {
            font-size: 14px;
        }

        .footer-links {
            display: flex;
            gap: 20px;
        }

        .footer-links a {
            color: #ddd;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-links a:hover {
            color: white;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                gap: 15px;
            }

            .nav-links {
                flex-wrap: wrap;
                justify-content: center;
            }

            .dashboard {
                grid-template-columns: 1fr;
            }

            .footer-content {
                flex-direction: column;
                gap: 15px;
            }

            .user-info {
                max-width: 150px;
            }
        }

        @media (max-width: 480px) {
            .user-info {
                max-width: 100px;
            }

            .user-name {
                font-size: 14px;
            }
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<header>
    <div class="container">
        <nav class="navbar">
            <div class="logo">
                <i class="fas fa-cogs"></i>
                <h1>智慧后勤综合管理系统</h1>
            </div>
            <div class="nav-links">
                <a href="home.html" class="active">首页</a>
                <a href="mall.html">商城服务</a>
                <a href="search.html">搜索服务</a>
                <a href="profile.html">个人信息</a>
            </div>
            <div class="user-actions">
                <div class="user-info" id="user-info" onclick="window.location.href='profile.html'">
                    <div class="user-avatar">
                        <i class="fas fa-user"></i>
                    </div>
                    <div class="user-name" id="display-name">张明</div>
                </div>
            </div>
        </nav>
    </div>
</header>

<!-- 主内容区域 -->
<div class="container">
    <!-- 主页面 -->
    <div>
        <div class="page-title">
            <i class="fas fa-home"></i>
            <h2>系统首页</h2>
        </div>
        <div class="dashboard">
            <div class="card" onclick="window.location.href='mall.html'">
                <div class="card-header">
                    <i class="fas fa-shopping-cart"></i>
                    <div>
                        <h3 class="card-title">商城服务</h3>
                        <p class="card-content">外卖预定、每日菜品、绿化基地、医疗服务、团购、办公用品</p>
                    </div>
                </div>
            </div>
            <div class="card" onclick="window.location.href='search.html'">
                <div class="card-header">
                    <i class="fas fa-search"></i>
                    <div>
                        <h3 class="card-title">搜索服务</h3>
                        <p class="card-content">快速搜索、全文检索、智能推荐、历史记录</p>
                    </div>
                </div>
            </div>
            <div class="card" onclick="window.location.href='profile.html'">
                <div class="card-header">
                    <i class="fas fa-user-circle"></i>
                    <div>
                        <h3 class="card-title">个人信息</h3>
                        <p class="card-content">个人资料、账户安全、我的订单、消息通知</p>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <i class="fas fa-key"></i>
                    <div>
                        <h3 class="card-title">权限管理</h3>
                        <p class="card-content">角色分配、权限设置、访问控制、操作日志</p>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <i class="fas fa-database"></i>
                    <div>
                        <h3 class="card-title">缓存系统</h3>
                        <p class="card-content">分布式缓存、性能优化、数据同步、缓存监控</p>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card-header">
                    <i class="fas fa-file-upload"></i>
                    <div>
                        <h3 class="card-title">文件管理</h3>
                        <p class="card-content">图片上传、附件管理、视频处理、云存储</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 底部信息 -->
<footer>
    <div class="footer-content">
        <div class="copyright">
            &copy; 2023 智慧后勤综合管理系统 | 企业后勤服务解决方案
        </div>
        <div class="footer-links">
            <a href="#">关于我们</a>
            <a href="#">服务条款</a>
            <a href="#">隐私政策</a>
            <a href="#">帮助中心</a>
            <a href="#">联系我们</a>
        </div>
    </div>
</footer>

<script>
    // 页面加载时设置用户名
    document.addEventListener('DOMContentLoaded', function() {
        const username = localStorage.getItem('currentUser');
        if (username) {
            document.getElementById('display-name').textContent = username;
        } else {
            // 如果未登录，跳转到登录页面
            window.location.href = 'login.html';
        }
    });
</script>
</body>
</html>